package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.SurveyCatalogConfig;
import com.caigou.bean.cms.entity.SurveyCatalogList;
import com.caigou.bean.cms.entity.SurveyOperationLog;
import com.caigou.bean.cms.param.SurveyCatalogParam;
import com.caigou.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository("SurveyCatalogMapper")
public interface SurveyCatalogMapper {
    List<CatalogConfigList> loadSurveyCatalogConfigList(SurveyCatalogParam param);

    int updateSurveyCatalogConfigStatus(@Param("catalogId") String catalogId, @Param("status") Integer status);

    int loadCatalogIsExist(@Param("catalogId") String catalogId);

    int saveCatalogConfig(SurveyCatalogConfig config);

    int saveCatalogList(SurveyCatalogList list);

    CatalogConfigData loadSurveyCatalogConfigData(@Param("catalogId") String catalogId);

    List<CatalogConfigListData> loadCatalogConfigListData(@Param("catalogId") String catalogId, @Param("superId") Integer superId);

    int updateCatalogConfig(SurveyCatalogConfig config);

    int deleteCatalogList(@Param("catalogId") String catalogId);

    int deleteByFormId(@Param("formId")String formId);

    List<SurveyRecycledList> loadSurveyFormRecycledList(SurveyCatalogParam param);

    List<SurveyRecycledList> loadSurveyCatalogRecycledList(SurveyCatalogParam param);

    int loadCatalogIsCanDelete(@Param("catalogId") String catalogId, @Param("catalogStatus") Integer catalogStatus);

    int deleteSurveyCatalogConfigData(@Param("catalogId") String catalogId);

    int saveSurveyOperationLog(SurveyOperationLog operationLog);

    List<SurveyHistoryList> loadSurveyHistoryList(SurveyCatalogParam param);

    SurveyCatalogConfig loadSurveyCatalogConfig(@Param("catalogId") String catalogId);

    List<String> loadSurveyCatalogRecycledIdList();

    SurveyCatalogData loadSurveyCatalogData(@Param("catalogId") String catalogId);

    List<SurveyCatalogListData> loadSurveyCatalogListData(@Param("catalogId") String catalogId, @Param("superId") Integer superId);

    String loadCatalogIdByForm(@Param("formId") String formId);

    SurveyCatalogStatistics loadSurveyCatalogStatistics(@Param("catalogId") String catalogId);

    List<SurveyFormStatistics> loadSurveyFormStatistics(@Param("catalogId") String catalogId);

    SurveyCatalogList selectSurveyCatalogList(@Param("catalogId")String catalogId, @Param("formId")String formId);

    SurveyCatalogList selectSurveyCatalogListByFormId(@Param("formId")String formId);

    int deleteSurveyCatalogListByFormId(@Param("formId")String formId);

    int updateShowIndex(SurveyCatalogList surveyCatalogList);

    List<String> loadSurveyFormListByList(@Param("catalogId") String catalogId);
}